<template>
   <div class="detail">  
        <!-- 轮播图  -->
        <Swiper :arr="gallery"></Swiper>

   </div>
</template>

<script>
import {getDetailApi} from  '@/utils/https.js'
import Swiper from "@/components/Swiper.vue"
export default {
    components:{Swiper},
    data(){return {gallery:[] }},
    created(){
        getDetailApi({id:this.$route.query.id}).then((res) => {
         console.log(res)
         this.gallery= JSON.parse(JSON.stringify(res.data.gallery).replace(/img_url/g,"image_url")   )     
            
        })
       
    }

}
</script>

<style lang="less" scoped>
  .detail{width: 100%;
           img{width: 100%;}
        }
</style>